a = {123: ['qwe', 23], '234': [123414123], 'aha': 1233}
print(a)

a.pop(1233)
print(a)




# @bp1.websocket('/register')
# async def register(request, ws):
#     name = await ws.recv()
#     ip = request.ip
#
#     iplist= []
#     waitdic[ip] = name      # ip-名字
#     _list = []      # 名字
#     for i, j in waitdic.items():    # for循环里最好用i, j
#         _list.append(j)
#         iplist.append(i)
#     print('your name:', name)
#     print('waitdic:', waitdic)
#     if _list.count(name) == 1 and name != 'null' and name:
#         wait_wsdic[ip] = ws  # 将ip与ws绑定
#
#         rt = ','.join(str(i) for i in _list)     # 将数组转换成字符串发送
#         for i in iplist:  # 给所有用户同时更新用户信息界面
#             await wait_wsdic[i].send(rt)
#
#             quit_ = 0
#             while True:
#                 # 进入匹配等待
#                 for key, value in battledic.items():
#                     if value == name:
#                         # 如果当前玩家在value中
#                         battlelist[ip] = name
#                         await ws.send('yes')
#
#                         while True:  # 存放black的等待
#                             await asyncio.sleep(1)
#                     if key == name:  # 存放white的等待
#                         battlelist[ip] = name
#                         await ws.send('yes')
#
#                         while True:
#                             await asyncio.sleep(1)
#
#                 if quit_ == 1:
#                     break
#                 print(name, '正在等待')
#                 await asyncio.sleep(1)
#
#     else:
#         await ws.send('your name is used')
#     print('******************', name, '退出游戏******************')
#
#
# @bp1.websocket('/waiting')
# async def waiting(request, ws):
#     name = ws.recv()
#     ip = request.ip
#
#     quit_ = 0
#     while True:
#         # 进入匹配等待
#         for key, value in battledic.items():
#             if value == name:
#                 # 如果当前玩家在value中
#                 battlelist[ip] = name
#                 await ws.send('yes')
#
#                 while True:  # 存放black的等待
#                     await asyncio.sleep(1)
#             if key == name:  # 存放white的等待
#                 battlelist[ip] = name
#                 await ws.send('yes')
#
#                 while True:
#                     await asyncio.sleep(1)
#
#         if quit_ == 1:
#             break
#         print(name, '正在等待')
#         await asyncio.sleep(1)
#
